<template>
  <div class="goodintro">
    <h3>{{ Goodsintroduce.title}}</h3>
    <hr />
    <div v-html="Goodsintroduce.content" class="goodscontent"></div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      id: this.$route.params.id,
      Goodsintroduce: []
    };
  },
  created() {
    this.getGoodsinfo();
  },
  methods: {
    getGoodsinfo() {
      this.$http
        .get("http://www.liulongbin.top:3005/api/goods/getdesc/" + this.id)
        .then(result => {
          if (result.body.status === 0) {
            this.Goodsintroduce = result.body.message[0];
          }
        });
    }
  }
};
</script>

<style lang="scss">
.goodintro {
  padding: 5px;
  h3 {
    text-align: center;
    color: blue;
    font-size: 16px;
  }
  .goodscontent {
    img {
      width: 100%;
    }
  }
}
</style>